#include<stdio.h>
#include<stdlib.h>
#include<malloc.h>

typedef struct Node{
    int Data;
    struct Node *Next;
} *List;
List Read(int i);

int main()
{
    List L1, L2, L3, LL3;
	int i ,j;
	scanf("%d",&i);    
    L1 = Read(i);
	L2 = Read(i);
	L3 = (List)malloc(sizeof(List));
	L3->Next = NULL;
	L3->Data = -1;
	LL3 = L3;
	L1 = L1->Next;
	L2 = L2->Next;
	while(L1 && L2){
        if(L1->Data < L2->Data){
            LL3->Next = L1;
            L1 = L1->Next;
        }else{
            LL3->Next = L2;
            L2 = L2->Next;
        }
        LL3 = LL3->Next;
    }
	while(L1){
        LL3->Next = L1;
        L1 = L1->Next;
        LL3 = LL3->Next;
    }
	while(L2){
        LL3->Next = L2;
        L2 = L2->Next;
        LL3 = LL3->Next;
    }
    int f ;
    if(2*i%2==0) f=0;
    else f=1;
    L3 = L3->Next;
    if(!L3) printf("NULL\n");
    else {
    	for(j=0;j<2*i/2-1;j++) L3 = L3->Next;
		printf("%d",L3->Data);
	}
	return 0;
}
    
List Read(int i){
	List L, tmp, LL;
	int Data;
	L = (List)malloc(sizeof(List));
	L->Next = NULL;
	L->Data = -1;
	LL = L;
	while(i--){
		scanf("%d",&Data);//读入下一个数据		
		tmp = (List)malloc(sizeof(List));//tmp分配空间
		tmp->Data = Data;//tmp数据为当前读入的数据
		tmp->Next = NULL;//tmp相当于链表最后一个结点，Next为空
		LL->Next = tmp;
		LL = LL->Next;//当前结点后移
	}
	return L;
}
